import request from '@/utils/request'

// 邮件通知

/**
 * 获取
 * @returns
 */
// export function getEmail() {
//   return request({
//     url: '/email/email',
//     method: 'get'
//   })
// }
export function getEmail(page = 1, size = 10, data = {}) {
  return request({
    url: `/email/search/${page}/${size}`,
    method: 'post',
    data: data
  })
}
/**
 * 更改
 * @returns
 */
export function changeEmail(data) {
  return request({
    url: '/email/modify',
    method: 'put',
    data
  })
}

/**
 * 新增
 * @returns data
 */
export function addEmail(data) {
  return request({
    url: '/email/add',
    method: 'post',
    data
  })
}
/**
 * 删除邮件配置
 * @param {*} id
 * @returns data
 */
export function deleteEmail(id) {
  return request({
    url: `/email/delete?id=${id}`,
    method: 'delete'
  })
}

